<?php
require_once '../library/core.php';
if (isset($_GET['mod']) && $_GET['mod'] == 'logout') {
	unset($_SESSION['user']);
}

/*
 if(!$_SESSION['uid']){
 header( 'Location: '.APPLICATION_SITEADMIN_URL . '?mod=login' ) ;
 }
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<?php
		require_once '../library/core.php';
		?>
		<title>VuQuang :: Administrator Panel </title>
		<link href="<?= APPLICATION_URL ?>assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
		<link href="<?= APPLICATION_SITEADMIN_URL ?>style/style.css" rel="stylesheet" type="text/css" />
		<script src="<?php echo APPLICATION_URL; ?>js/jquery-1.10.2.min.js"></script>
		<script type="text/javascript" src="<?= APPLICATION_URL ?>assets/bootstrap/js/bootstrap.min.js"></script>
		<script language="javascript" src="<?= APPLICATION_SITEADMIN_URL ?>js/common.js"></script>
		<script language="javascript" src="<?= APPLICATION_SITEADMIN_URL ?>js/ajax.js"></script>
		<!--<script language="javascript" src="<?= APPLICATION_SITEADMIN_URL ?>js/dndtable.js"></script>-->
		<script language="javascript" src="<?= APPLICATION_SITEADMIN_URL ?>js/parsley.js"></script>

		<script>var APPLICATION_SITEADMIN_URL =  '<?= APPLICATION_SITEADMIN_URL ?>
			';
		</script>
		<script language="javascript" src="<?= APPLICATION_SITEADMIN_URL ?>ckeditor/ckeditor.js"></script>

	</head>

	<body>
		<?php
		include_once ("top.php");
		?>
		<div class="admin-container">
			<?php if (isset($_SESSION['user'])):
			?>
			<div class="row">
				<div class="col-md-3 left-col">
					<?php
					include_once ('left.php');
					?>
				</div>
				<div class="col-md-9 right-col">
					<?php
					/*
					$mainpage = "mod.php";
					if (file_exists($mainpage))
						include_once ($mainpage);
					?>
					 * */
					 require_once 'action.php';
					 ?>
				</div>
			</div>

			<?php else: ?>
				<?php require_once 'login.php'; ?>
			<?php endif; ?>
		</div>
	</body>
</html>